package com.ruoyi.quartz.service.impl;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.support.Convert;
import com.ruoyi.quartz.domain.HatchetAcqJifen;
import com.ruoyi.quartz.mapper.HatchetAcqJifenMapper;
import com.ruoyi.quartz.service.IHatchetAcqJifenService;

/**
 * 积分记录 服务层实现
 * 
 * @author ruoyi
 * @date 2019-03-07
 */
@Service
public class HatchetAcqJifenServiceImpl implements IHatchetAcqJifenService 
{
	@Autowired
	private HatchetAcqJifenMapper hatchetAcqJifenMapper;

	/**
     * 查询积分记录信息
     * 
     * @param uuid 积分记录ID
     * @return 积分记录信息
     */
    @Override
	public HatchetAcqJifen selectHatchetAcqJifenById(String uuid)
	{
	    return hatchetAcqJifenMapper.selectHatchetAcqJifenById(uuid);
	}
	
	/**
     * 查询积分记录列表
     * 
     * @param hatchetAcqJifen 积分记录信息
     * @return 积分记录集合
     */
	@Override
	public List<HatchetAcqJifen> selectHatchetAcqJifenList(HatchetAcqJifen hatchetAcqJifen)
	{
	    return hatchetAcqJifenMapper.selectHatchetAcqJifenList(hatchetAcqJifen);
	}
	
    /**
     * 新增积分记录
     * 
     * @param hatchetAcqJifen 积分记录信息
     * @return 结果
     */
	@Override
	public int insertHatchetAcqJifen(HatchetAcqJifen hatchetAcqJifen)
	{
	    return hatchetAcqJifenMapper.insertHatchetAcqJifen(hatchetAcqJifen);
	}
	
	/**
     * 修改积分记录
     * 
     * @param hatchetAcqJifen 积分记录信息
     * @return 结果
     */
	@Override
	public int updateHatchetAcqJifen(HatchetAcqJifen hatchetAcqJifen)
	{
	    return hatchetAcqJifenMapper.updateHatchetAcqJifen(hatchetAcqJifen);
	}

	/**
     * 删除积分记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteHatchetAcqJifenByIds(String ids)
	{
		return hatchetAcqJifenMapper.deleteHatchetAcqJifenByIds(Convert.toStrArray(ids));
	}

	@Override
	public HatchetAcqJifen selectJifenByOrderId(String paymentOrderId) {
		 return hatchetAcqJifenMapper.selectJifenByOrderId(paymentOrderId);
	}

	/**
	 * 查询总结算金额
	 */
	public BigDecimal selectSumMoney(HatchetAcqJifen hatchetAcqJifen) {
		return hatchetAcqJifenMapper.selectSumMoney(hatchetAcqJifen);
	}
	
}
